home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_497 / nldaemon / nl-daemon.doc < prev    next >
Text File  |  1992-05-06  |  8KB  |  165 lines

  1. OVERVIEW:
  2.  
  3. Much of the gadget imagery in the Amiga looks flat and 2-dimensional,
  4. but with the four colors available on the workbench screen, a much more
  5. 3-dimensional appearance is possible.  By setting your colors correctly, and
  6. by using a particular gadget style, you can make the Amiga imagery look 3D.
  7. I call this visual style the "New Look," here-after refered to as the NL,
  8. or just NL.
  9.  
  10. NL-Daemon is a program that implements the New Look even for programs that
  11. were not designed to take advantage of it.  NL-Daemon replaces the standard
  12. Intuition depth, close, and sizing gadgets with their NL counterparts, and 
  13. changes the detail and block pens to conform to the NL style.
  14.  
  15.  
  16. HOW TO USE NL-DAEMON:
  17.  
  18. You should place NL-Daemon in your C: directory (or in your current path),
  19. and NL-Handler in the L: directory (or in the current directory). To start
  20. NL-Daemon, simply type NL-Daemon at the CLI prompt:
  21.  
  22.     1> NL-Daemon
  23.  
  24. You do not need to "RUN" NL-Daemon, since NL-Daemon loads the handler code
  25. separately, sets up the handler, and then exits.  To remove the daemon, 
  26. simply issue the NL-Daemon command a second time.
  27.  
  28. Once the NL-Daemon is running, you should see all the windows and screens 
  29. change to the New Look.  Provided you have chosen your screen colors carefully,
  30. this should make the Intuition gadgets look 3-dimensional.  The colors you 
  31. choose should satisfy the following conditions:  color 0 (the background color)
  32. should be a medium dark color; color 1 (the usual text and menu-bar color)
  33. should be the lightest color; color 2 (used in the depth gadgets) should be a
  34. medium bright color; and color 3 (the CLI cursor color) should be the darkest
  35. color.  (Notice that the relationship of colors 2 and 3 are reversed from the 
  36. default Intuition settings; this has the advantage of making the gadget appear
  37. correctly even on one-bit-plane screens, and improves menu appearance).  You 
  38. should use the Palette Tool or Preferences to experiment until you find a 
  39. color-scheme that suits your taste, but that still gives the 3D effect.  
  40. A reasonable grey-scale setup would has Palette-Tool values 454 FFC 997 000.
  41. (Monitors differ, so these values may need to be adjusted to suit your
  42. monitor and lighting conditions).  More colorful combinations also are possible.
  43.  
  44.  
  45. USAGE NOTES:
  46.  
  47. You can make NL-Daemon part of your standard working environment by adding
  48. the "NL-DAEMON" command (or "NL-DAEMON > NIL:") to the startup-sequence file
  49. in the S: directory on your boot disk.
  50.  
  51. If you use NL-Daemon in conjunction with Zoom-Daemon, you should issue the
  52. Zoom-Daemon command first, and then NL-Daemon.  The NL-Daemon has an NL image
  53. designed for the Zoom Gadget and will replace it along with the other window 
  54. imagery, provided NL-Daemon is run second.
  55.  
  56. NL-Daemon will not change the color of a window that is opening on a screen
  57. that is only one bitplane deep (since the NL window colors are colors 2 and 3,
  58. which are not available on only one bitplane).  NL-Daemon uses the standard 
  59. depth gadgets for one-bitplane screens, as the NL equivalents are ineffective 
  60. in only two colors.
  61.  
  62. NL-Daemon will change a screen or window's Block and Detail pen only if they
  63. are initially set to the standard window colors (Block = 1, Detail = 0).  That 
  64. way, NL-Daemon should not disrupt programs that use window or screen colors for
  65. special purposes. 
  66.  
  67. The NL imagery may look bad on screens that have their own color maps, since
  68. those programs are not prepared to have the Intuition gadgets use colors other
  69. than the defaults.  If this is the case, either remove NL-Daemon while you are
  70. using such a program, or use the Palette Tool (provided with WB1.3) to change
  71. the screen colors.
  72.  
  73. Some programs that include color images in the menu strip assume that the
  74. menu strip background color is color 1 and so do not include an Image
  75. structure for the menu choice for color 1 (probably to save a little space).
  76. In this case, when the BlockPen is changed to 2, the menu color changes, so 
  77. the choice for color 1 will be displayed in color 2.  The menu will still
  78. function properly, but will be colored incorrectly.  All the programs supplied
  79. with WB1.3 seem to work this way, in particular, NotePad and IconEd both
  80. demonstrate this difficulty.
  81.  
  82. If you remove the NL-Daemon while windows or screens containing NL imagery
  83. are still open, NL-Daemon will restore the original imagery and colors
  84. automatically.
  85.  
  86.  
  87. TECHNICAL NOTES:
  88.  
  89. NL-Daemon uses SetFunction to trap the OpenWindow and OpenScreen calls, and
  90. after a window or screen is opened, it checks the gadget list for SYSGADGETS
  91. and replaces their imagery with the NL imagery.  It also alters the window and
  92. screen colors if appropriate.  Unfortunately, the window BlockPen also controls
  93. the menu color, and many programs specify IntuiTexts in their menus that have a
  94. draw mode of JAM2, with the background color set to 1.  The NL window BlockPen
  95. is color 2, so this makes menus look very strange.  To solve this problem,
  96. NL-Daemon also traps calls to SetMenuStrip, and checks each menuitem and
  97. subitem for IntuiTexts.  See the code for details of how the different draw
  98. modes are handled.  Although NL-Daemon currently does as little modification of
  99. menus as possible, you may find that you want it to do more with the menu text
  100. colors, depending on the color choices you make.
  101.  
  102. Note that NL-Daemon only modifies menus on windows for which it has changed
  103. the window color.  You can prevent NL-Daemon from affecting your menus or
  104. window colors by specifying a BlockPen other than the standard color 1.
  105.  
  106. Finally, NL-Daemon also modifies the CheckMark and AmigaIcon images used
  107. by Intuition to draw the menu check marks and command-key sequences, so that
  108. they will have color 2 as their background color.  This is done by an illegal
  109. modification to the IntuitionBase INTUITIONPRIVATE data fields.  This is almost
  110. guaranteed to break under a new release of the operating system.  For this
  111. reason (and for those who are timid about this sort of illegal behavior),
  112. you can request that NL-Daemon NOT modify the checkmark and amiga key images.
  113. To do this, simply include the word BE_GOOD as a parameter when you initiate
  114. NL-Daemon:
  115.  
  116.     1> NL-Daemon Be_Good
  117.  
  118. (actually, any non-blank parameter will do).  This prevents NL-Daemon
  119. from modifying the IntuitionBase structures, but may cause menus to look
  120. a little funny.
  121.  
  122. Since the window colors are not changed for one-bitplane screens, the changes
  123. in the checkmark and amiga key images will cause these images to be inverted 
  124. on one-bitplane screens.
  125.  
  126. When you remove NL-Daemon, it replaces the original Intuition imagery for
  127. all the gadgets that it changed, and it returns the IntutionBase variables 
  128. to their original state.  NL-Daemon does not, however, undo any changes
  129. that it made to menu IntuiText structures, so if you remove NL-Daemon while
  130. menus are changed, the menus may be left with strange colors in them.
  131.  
  132. Since Intuition does not use its own vector table internally, any windows
  133. opened by Intuition (e.g, System Requests and other windows created by
  134. AutoRequest or BuildSysRequest) will not have their imagery altered by 
  135. NL-Daemon, although they may inherit the altered screen colors.
  136.  
  137.  
  138. COMPILING NL-DAEMON:
  139.  
  140. NL-Daemon was developed using the Lattice C compiler v4.0 on a 512K
  141. Amiga 1000.  It probably will need to be modified to work with the
  142. Manx Aztec C compiler.  To compile and link NL-Daemon, use the following 
  143. commands (these appear in NL-Daemon.com, distributed with the source code):
  144.  
  145.             1> lc -b0 -v  -M NL-Main NL-Handler NL-Setup
  146.             1> lc -b0 -ad -M NL-Image
  147.             1> asm NL-Stubs
  148.             1> blink with NL-Daemon.lnk
  149.             1> blink with NL-Handler.lnk
  150.  
  151. The -v -b0  and -ad options are required.  You can add -r if you like.
  152. The -M is to compile only those source files that have been updated since the
  153. last compile.
  154.  
  155.  
  156. AUTHOR:
  157.  
  158. NL-Daemon and NL-Handler
  159. Copyright 1989 by Davide P. Cervone, all rights reserved.
  160.  
  161. Davide P. Cervone
  162. Department of Mathematics, Box 1917                 ST402523@BROWNVM.BITNET
  163. Brown University                                    st402523@brownvm.brown.edu
  164. Providence, Rhode Island  02912                     dpvc@fermat.math.brown.edu
  165.